package com.zb.vo;

import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author WEN
 * @Date 2023/9/4 0004
 **/
@Data
@ApiModel("编码用户登记对象")
public class CodeUserRegisterVo {
    @ApiModelProperty(value = "编码用户登记ID，新增登记不必传，修改登记必传")
    private Long id;

    @NotNull(message = "用户信息不能为空")
    @ApiModelProperty(value = "用户ID", required = true, example = "0")
    private Long userId;

    @NotBlank(message = "登记姓名不能为空")
    @Length(max = 100, message = "登记姓名限制在100个字符以内")
    @ApiModelProperty(value = "登记用户姓名", required = true)
    private String name;

    @NotBlank(message = "登记手机号不能为空")
    @Pattern(regexp = VerificUtil.REGEX_PHONE, message = "登记手机号参数不合法！")
    @ApiModelProperty(value = "登记用户手机号")
    private String phone;

    @NotBlank(message = "登记地址-省不能为空")
    @Length(max = 50, message = "登记地址-省限制50个字符以内")
    @ApiModelProperty(value = "登记地址-省")
    private String province;

    @NotBlank(message = "登记地址-市不能为空")
    @Length(max = 50, message = "登记地址-市限制50个字符以内")
    @ApiModelProperty(value = "登记地址-市")
    private String city;

    @NotBlank(message = "登记地址-县/区不能为空")
    @Length(max = 50, message = "登记地址-县/区限制50个字符以内")
    @ApiModelProperty(value = "登记地址-县/区")
    private String area;

    @Length(max = 50, message = "登记地址-县/区限制50个字符以内")
    @ApiModelProperty(value = "登记地址-镇")
    private String town;

    @NotBlank(message = "详细地址不能为空")
    @Length(max = 50, message = "详细地址限制200个字符以内")
    @ApiModelProperty(value = "登记详细地址")
    private String address;
}
